package com.mvc.controller.healthmanager;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mvc.model.base.Json;
import com.mvc.model.healthmanager.archive.BodyCheck;
import com.mvc.model.mb.archive.BaseInfo;
import com.mvc.model.mb.archive.User;
import com.mvc.service.healthmanager.BodyCheckServiceI;
import com.mvc.utils.MD5Util;

@RequestMapping("/body")
@Controller
public class BodyCheckController {
	
	@Autowired
	private BodyCheckServiceI bcsi;
	
	@RequestMapping("/findBodyChecks")
	@ResponseBody
	public Json findBodyChecks(BaseInfo bi){
		Json j = new Json();
		try {
			List<BodyCheck> list = bcsi.findBodyChecks(bi);
			if(list.size()>0){
				j.setObj(list);
				j.setSuccess(true);
				j.setMsg("查询成功！");
			}else{
				j.setMsg("无数据");
				j.setSuccess(false);
			}
		} catch (Exception e) {
			j.setMsg("查询失败");
			j.setSuccess(false);
			e.printStackTrace();
		}
		return j;
	}

}
